Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

LASTAPP(app(compose, hd), reverse)
LASTAPP(compose, hd)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(cons, x), l)
INITAPP(app(compose, tl), reverse)
INITAPP(compose, tl)
APP(app(app(compose, f), g), x) → APP(f, x)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(reverse2, xs)
INITAPP(compose, reverse)
APP(reverse, l) → APP(reverse2, l)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(reverse2, xs), app(app(cons, x), l))
APP(app(app(compose, f), g), x) → APP(g, app(f, x))
APP(reverse, l) → APP(app(reverse2, l), nil)
INITAPP(app(compose, reverse), app(app(compose, tl), reverse))

The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

LASTAPP(app(compose, hd), reverse)
LASTAPP(compose, hd)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(cons, x), l)
INITAPP(app(compose, tl), reverse)
INITAPP(compose, tl)
APP(app(app(compose, f), g), x) → APP(f, x)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(reverse2, xs)
INITAPP(compose, reverse)
APP(reverse, l) → APP(reverse2, l)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(reverse2, xs), app(app(cons, x), l))
APP(app(app(compose, f), g), x) → APP(g, app(f, x))
APP(reverse, l) → APP(app(reverse2, l), nil)
INITAPP(app(compose, reverse), app(app(compose, tl), reverse))

The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

LASTAPP(app(compose, hd), reverse)
LASTAPP(compose, hd)
INITAPP(app(compose, tl), reverse)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(cons, x), l)
INITAPP(compose, tl)
APP(app(app(compose, f), g), x) → APP(f, x)
INITAPP(compose, reverse)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(reverse2, xs)
APP(reverse, l) → APP(reverse2, l)
APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(reverse2, xs), app(app(cons, x), l))
APP(app(app(compose, f), g), x) → APP(g, app(f, x))
APP(reverse, l) → APP(app(reverse2, l), nil)
INITAPP(app(compose, reverse), app(app(compose, tl), reverse))

The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 2 SCCs with 10 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ QDPOrderProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(reverse2, xs), app(app(cons, x), l))

The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

REVERSE2(cons(x, xs), l) → REVERSE2(xs, cons(x, l))

R is empty.
The set Q consists of the following terms:

compose(x0, x1, x2)
reverse(x0)
reverse2(nil, x0)
reverse2(cons(x0, x1), x2)
hd(cons(x0, x1))
tl(cons(x0, x1))
last
init

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP(app(reverse2, app(app(cons, x), xs)), l) → APP(app(reverse2, xs), app(app(cons, x), l))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
REVERSE2(x1, x2)  =  x1
cons(x1, x2)  =  cons(x2)

Recursive path order with status [2].
Quasi-Precedence:
trivial

Status:
trivial


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(app(compose, f), g), x) → APP(g, app(f, x))
APP(app(app(compose, f), g), x) → APP(f, x)

The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


APP(app(app(compose, f), g), x) → APP(g, app(f, x))
APP(app(app(compose, f), g), x) → APP(f, x)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
APP(x1, x2)  =  x1
app(x1, x2)  =  app(x1, x2)
compose  =  compose

Recursive path order with status [2].
Quasi-Precedence:
trivial

Status:
trivial


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(app(compose, f), g), x) → app(g, app(f, x))
app(reverse, l) → app(app(reverse2, l), nil)
app(app(reverse2, nil), l) → l
app(app(reverse2, app(app(cons, x), xs)), l) → app(app(reverse2, xs), app(app(cons, x), l))
app(hd, app(app(cons, x), xs)) → x
app(tl, app(app(cons, x), xs)) → xs
lastapp(app(compose, hd), reverse)
initapp(app(compose, reverse), app(app(compose, tl), reverse))

The set Q consists of the following terms:

app(app(app(compose, x0), x1), x2)
app(reverse, x0)
app(app(reverse2, nil), x0)
app(app(reverse2, app(app(cons, x0), x1)), x2)
app(hd, app(app(cons, x0), x1))
app(tl, app(app(cons, x0), x1))
last
init

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.